package com.dachuang.canjiren.controller;


import com.dachuang.canjiren.service.ApplicationService;
import com.dachuang.canjiren.service.IBannerService;
import com.dachuang.common.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author testjava
 * @since 2020-07-27
 */
@RestController
@RequestMapping("/canjiren/application")
public class ApplicationController {

    @Autowired
    private ApplicationService applicationService;


    @GetMapping(value = "insertApplication")
    R insertApplication(
                 @RequestParam(value = "name",required = false) String name,
                 @RequestParam(value = "cardNumber",required = false) String cardNumber,
                 @RequestParam(value = "phone",required = false) String phone,
                 @RequestParam(value = "activity",required = false) String activity,
                 @RequestParam(value = "introduction",required = false) String introduction,
                 @RequestParam(value = "plan",required = false) String plan,
                 @RequestParam(value = "volunteerId",required = false) Integer volunteerId){
        return applicationService.insertApplication(name, cardNumber, phone, activity, introduction, plan, volunteerId);
    }

}

